# Carnal Realms religious titles.
#
# Catholic and Fraticelli papal succession use these vanilla cardinal title
# keys, so CR owns the definitions directly instead of letting vanilla supply
# uncapped candidates.

title_cardinal = {
	religion = catholic
	can_elect_head = yes
	revoke_allowed = no

	grant_limit = 9

	realm_in_name = no
	show_as_title = yes

	opinion_effect = 20
	dignity = 0.9

	monthly_salary = 0.1
	monthly_prestige = 0.5

	allowed_to_grant = {
		always = no
	}
	allow = {
		religion = catholic
		is_adult = yes
		NOT = { practical_age >= 36 }
		is_theocracy = yes
		k_papal_state = {
			holder_scope = {
				is_within_diplo_range = ROOT
			}
		}

		NOT = {
			top_liege = {
				any_vassal = {
					any_claim = {
						title = k_papal_state
					}
				}
			}
		}
	}

	dismissal_trigger = {
		OR = {
			NOT = { religion = catholic }
			NOT = { is_adult = yes }
			practical_age >= 36
			NOT = { is_theocracy = yes }
			NOT = {
				k_papal_state = {
					holder_scope = {
						is_within_diplo_range = ROOT
					}
				}
			}
			top_liege = {
				any_vassal = {
					any_claim = {
						title = k_papal_state
					}
				}
			}
		}
	}

	gain_effect = {
	}

	lose_effect = {
	}

	message = yes
}

title_fraticelli_cardinal = {
	religion = fraticelli
	can_elect_head = yes
	revoke_allowed = no

	grant_limit = 9

	realm_in_name = no
	show_as_title = yes

	opinion_effect = 20
	dignity = 0.9

	monthly_salary = 0.1
	monthly_prestige = 0.5

	allowed_to_grant = {
		always = no
	}
	allow = {
		religion = fraticelli
		is_adult = yes
		NOT = { practical_age >= 36 }
		is_theocracy = yes
		d_fraticelli = {
			holder_scope = {
				is_within_diplo_range = ROOT
			}
		}

		NOT = {
			top_liege = {
				any_vassal = {
					any_claim = {
						title = d_fraticelli
					}
				}
			}
		}
	}

	dismissal_trigger = {
		OR = {
			NOT = { religion = fraticelli }
			NOT = { is_adult = yes }
			practical_age >= 36
			NOT = { is_theocracy = yes }
			NOT = {
				d_fraticelli = {
					holder_scope = {
						is_within_diplo_range = ROOT
					}
				}
			}
			top_liege = {
				any_vassal = {
					any_claim = {
						title = d_fraticelli
					}
				}
			}
		}
	}

	gain_effect = {
	}

	lose_effect = {
	}

	message = yes
}
